package com.sky.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 贾晓晨
 * @version 1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ArticleCommentDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "评论ID", required = false)
    private Integer id;
    @ApiModelProperty(value = "文章ID", required = true)
    private Integer articleId;
    // @ApiModelProperty(value = "文章所属用户的ID", required = true)
    // private Integer articlePostId;
    @ApiModelProperty(value = "发送评论的用户ID", required = true)
    private Integer userId;
    @ApiModelProperty(value = "发送评论的用户昵称", required = true)
    private String nickName;
    @ApiModelProperty(value = "发送评论的用户头像", required = false)
    private String avatarUrl;
    @ApiModelProperty(value = "评论的父级ID（如果是回复的评论）", required = false)
    private String parentName;
    @ApiModelProperty(value = "评论内容", required = true)
    private String content;
    @ApiModelProperty(value = "所属头部评论的id（本表的id 二级用）", required = true)
    private Integer headId;
    @ApiModelProperty(value = "评论图片的URL", required = false)
    private List<String> contentImg;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 日期格式化
    @ApiModelProperty(value = "发送评论时间", required = false)
    private LocalDateTime createTime;
}
